package cn.edu.fzu.homemaking.dfa;

import java.util.Set;

/**
 * 匹配结果, 根据参数决定要不要返回匹配到的字符串
 */
class DfaResult {

    // 不匹配
    static final DfaResult NOT_MATCH  = new DfaResult(false);

    // 匹配, 但不返回匹配的字符串
    static final DfaResult ONLY_MATCH = new DfaResult(true);

    boolean                match;

    Set<String>            allString;

    DfaResult(boolean match) {
        this.match = match;
        this.allString = null;
    }


    DfaResult(Set<String> allString) {
        this.match = true;
        this.allString = allString;
    }

}
